com.supermap.realspace

Class ARControl

  • java.lang.Object
    • com.supermap.realspace.ARControl


  • public class ARControl
    extends java.lang.Object
    3D AR control.
    • Constructor Detail

      • ARControl

        public ARControl(android.app.Activity activity,
                         SceneControl sceneControl)
        Constructor, construct ARControl object according to activity and SceneControl.
        Parameters:
        activity - specifies the activity.
        sceneControl - specifies sceneControl.
    • Method Detail

      • setARstate

        public void setARstate(boolean value)
        Set AR status.
        Parameters:
        value - A boolean value, true turns on AR mode, false turns off AR mode.
      • setAnchorOnClickListener

        public void setAnchorOnClickListener(AnchorOnClickListener listener)
        Click the monitor on the anchor point to return the ID of the identified plane.
        Parameters:
        listener - specifies the listener.
      • setSceneScale

        public void setSceneScale(double scalex,
                                  double scaley,
                                  double scalez)
        Set the zoom of the scene.
        Parameters:
        scalex - X-axis scaling factor, default 1.0.
        scaley - Y-axis scaling factor, the default is 1.0.
        scalez - Z-axis zoom factor, the default is 1.0.
      • setSceneRotation

        public void setSceneRotation(double rotX,
                                     double rotY,
                                     double rotZ)
        Set the rotation of the scene.
        Parameters:
        rotX - Rotation coefficient around X axis.
        rotY - Rotation coefficient around Y axis.
        rotZ - Rotation coefficient around the Z axis.
      • setSceneTransLation

        public void setSceneTransLation(double transLationX,
                                        double transLationY,
                                        double transLationZ)
        Set the translation of the scene.
        Parameters:
        transLationX - The translation coefficient in the X-axis direction.
        transLationY - Y-axis translation coefficient.
        transLationZ - The translation coefficient in the Z-axis direction.
      • setUpdateAnchor

        public void setUpdateAnchor(boolean value)
        Set whether to update the anchor status.
        Parameters:
        value - Whether to update the anchor point, a boolean value. true update anchor point false do not update anchor point.
      • setAugmentedImageTrackState

        public void setAugmentedImageTrackState(boolean isAugmentedImageTrack)
        Set whether to enable enhanced image tracking.
        Parameters:
        isAugmentedImageTrack - is a boolean value, true turns on enhanced image tracking, false turns off enhanced image tracking.
      • getAugmentedImageTrackState

        public boolean getAugmentedImageTrackState()
        Get whether to enable enhanced image tracking status.
        Returns:
        a boolean value, true turns on enhanced image tracking, false turns off enhanced image tracking.
      • configAugmentedImageInfo

        public void configAugmentedImageInfo(java.lang.String[] picfilepath)
        Configure the name array of the reference image, place the reference image in the assets directory, and use the arcoreimg tool to check the image quality of the image. The higher the quality, the better the tracking effect.
        Parameters:
        picfilepath - The name array of the reference image.
      • setAugmentedImageTrackingListener

        public void setAugmentedImageTrackingListener(ARControl.AugmentedImageTrackingListener listenner)
        Set up image tracking monitoring.
        Parameters:
        listenner - image tracking monitoring.
      • setARPlaneTrackingListener

        public void setARPlaneTrackingListener(ARControl.ARPlaneTrackingListener listenner)
        Set up AR plane tracking monitoring.
        Parameters:
        listenner - AR plane tracking monitoring.
      • setFrustumDist

        public void setFrustumDist(double NearDist,
                                   double FarDist)
        Set the near and far cropping plane of the AR camera.
      • setARPlaneState

        public void setARPlaneState(boolean value)
        Sets whether to display AR planes
        Parameters:
        value - true means to display the plane. false means the plane is invisible